﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Wix.Aura.Common.CustomTypes {
	public struct ShortFileNameType : IFileNameType, IEquatable<ShortFileNameType> {
		public ShortFileNameType(string value) {
			this.value = value;
		}

		private string value;

		public string Value { get { return value; } }

		public override string ToString() {
			return value;
		}


		public bool Equals(ShortFileNameType other) {
			return Value.Equals(other.Value);
		}

		public override bool Equals(object obj) {
			if (obj is ShortFileNameType)
				Equals((ShortFileNameType)obj);
			return false;
		}

		public override int GetHashCode() {
			int hash = 13;
			hash = 23 * hash + Value.GetHashCode();
			return hash;
		}


		public static bool operator ==(ShortFileNameType f1, ShortFileNameType f2) {
			return f1.Equals(f2);
		}


		public static bool operator !=(ShortFileNameType v1, ShortFileNameType v2) {
			return !v1.Equals(v2);
		}
	}
}
